class UserNameException extends RuntimeException{
    public UserNameException(){

    }
    public UserNameException(String Message){
        super(Message);
    }
}
class PassWordException extends RuntimeException{
    public PassWordException(){

    }
    public PassWordException(String Message){
        super(Message);
    }
}

public class LogIn {

    public static String Uname = "Admin";
    public static String Pword = "12345";

    public static void loginIoFo(String UserName,String PassWord){
        if(!UserName.equals(Uname)){
            throw new UserNameException("用户名错误！");
        }
        if(!PassWord.equals(Pword)){
            throw new PassWordException("密码错误！");
        }
        System.out.println("登录成功！");
    }

    public static void main (String[] args){
        try {
            loginIoFo("Admin1","12345");
        }catch (UserNameException userNameException){
            userNameException.printStackTrace();
        }catch (PassWordException passWordException){
            passWordException.printStackTrace();
        }
    }

}
